#!/bin/sh
if [ ! -f "/etc/crontabs/root" ]; then
        echo "* * * * * /bin/haproxy.sh" > /etc/crontabs/root
        echo " " >> /etc/crontabs/root
        echo 'root' >> /etc/crontabs/cron.update
else
        cun=`grep 'haproxy.sh' /etc/crontabs/root`
        if [ "$cun" = "" ];then
                sed -i 1i\\'* * * * * /bin/haproxy.sh' /etc/crontabs/root
        fi
fi
